import HttpApi from '@/util/request'

// -----------停车场------------
// 城市停车场列表查询
export function getCityParkingInfoList () {
  return new HttpApi({
    method: 'post',
    url: '/zlcx2/zlcxtccjtxxb/getCityParkingInfoList'
    // url: '/zlcx2/cityParkingInfo/getCityParkingInfoList'
  })
}
// 根据id查询单个停车场详情
export function getcityParkingInfoById (id) {
  return new HttpApi({
    method: 'get',
    isIdOfUrlPart: true,
    url: '/zlcx2/zlcxtccjtxxb'
    // url: '/zlcx2/cityParkingInfo/getcityParkingInfoById'
  })
}
// 根据id与经纬度获取停车场详情/zlcxtccjtxxb/getParkingDetail
export function getParkingDetailById ({ id = '' } = {}) {
  return new HttpApi({
    method: 'get',
    url: '/zlcx2/zlcxtccjtxxb/getParkingDetail'
  })
}
// 获取单个停车场详情
export function getParkingDetail (param) {
  return new HttpApi({
    method: 'get',
    //   url: '/zlcx2/cityParkingInfo/getParkingDetail'
      url: '/zlcx2/zlcxsjgttccbwxx/getParkingDetail',
      param
  })
}
// 获取当前位置周边停车场列表
export function getSurroundParkingList (data) {
  return new HttpApi({
    method: 'post',
      url: '/zlcx2/zlcxsjgttccbwxx/list',
    // url: '/zlcx/cityParkingInfo/list',
      data
  })
}
// 获取当前位置周边特殊停车场列表
export function getspecialParkingList (param) {
    return new HttpApi({
        method: 'get',
        url: '/zlcx2/zlcxsjgttccbwxx/special',
        // url: '/zlcx/cityParkingInfo/list',
        param
    })
}
// 获取当前位置周边充电桩列表
export function getNearChargeInfoList (param) {
    return new HttpApi({
        method: 'get',
        url: '/zlcx2/zlcxcdzjcxx/getNearChargeInfoList',
        // url: '/zlcx/cityParkingInfo/list',
        param
    })
}
// 获取当前位置周边加油站列表
export function getNearGasInfoList (param) {
    return new HttpApi({
        method: 'get',
        url: '/zlcx2/zlcxjyzjcxx/getNearGasInfoList',
        // url: '/zlcx/cityParkingInfo/list',
        param
    })
}

// 停车场纠错上报
export function parkingZlcxtccjcsb (data) {
    return new HttpApi({
        method: 'post',
        url: '/zlcx2/zlcxtccjcsb',
        // url: '/zlcx/cityParkingInfo/list',
        data
    })
}
// 城市停车场列表查询
export function getCityPRParkingList ({ cityCode = '' } = {}) {
  return new HttpApi({
    method: 'get',
    url: '/zlcx2/cityParkingInfo/getCityPRParkingList'
  })
}

// --------------周边--------------
// 周边查询
export function getAroundList () {
  return new HttpApi({
    method: 'get',
    url: '/zlcx2/cityBusstationInfo/aroundList'
  })
}
